#ifndef __GAMEHACK_GAMEHACK_SOURCE_GAMEHACK_H__
#define __GAMEHACK_GAMEHACK_SOURCE_GAMEHACK_H__

#include <list>
#include <inline_hook.hpp>

#include "kernel_reloader.h"

class GameHack
{
public:
	GameHack()
		: driver_obj_(NULL), org_ki_fast_call_entry_(NULL)
	{}
	~GameHack();
	bool Initialize(IN PDRIVER_OBJECT driver_obj, IN PUNICODE_STRING  registry_path);
	NTSTATUS DeviceIoControlHandler(IN PIRP irp);
private:
	bool KiFastCallEntryHandler(x86::Register& reg);
	void* GetKiFastCallEntry();
private:
	PDRIVER_OBJECT driver_obj_;
	void* org_ki_fast_call_entry_;

	NtOsKrnl ntoskrnl_;
	core::InlineHook<GameHack> inline_hook_;
	std::list<unsigned int, std::non_paged_alloc> pid_white_list_;
};
#endif//__GAMEHACK_GAMEHACK_SOURCE_GAMEHACK_H__
